package com.example.droideep.fragment;

import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.GridView;

import com.example.droideep.R;
import com.example.droideep.common.activities.SimpleFragmentBase;

import butterknife.InjectView;

/**
 * @author goodev
 * @date 15/7/4
 */
public class CheckGridFragment extends SimpleFragmentBase {

    @InjectView(R.id.character_grid)
    GridView mCharacterGrid;

    @InjectView(R.id.hobby_grid)
    GridView mHobbyGrid;

    @Override
    protected int getContentResId() {
        return R.layout.fragment_check_grid;
    }

    @Override
    public void onViewCreated(View view, Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        String[] characters = getActivity().getResources().getStringArray(R.array.character);
        mCharacterGrid.setAdapter(new ArrayAdapter<String>(getActivity(), R.layout.simple_list_item_checked, android.R.id.text1, characters));

        String[] hobbies = getActivity().getResources().getStringArray(R.array.hobby);
        mHobbyGrid.setAdapter(new ArrayAdapter<String>(getActivity(), R.layout.simple_list_item_checked, android.R.id.text1, hobbies));
    }
}
